package com.example.demo.tools;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
import com.example.demo.app.AppUtils;
import com.example.demo.bean.Menus;



/**
 * 监听器
 */
public class MenuListener extends AnalysisEventListener<Menus> {


    @Override
    public void invoke(Menus menus, AnalysisContext analysisContext) {
        AppUtils.menusList.add(menus);
//        System.out.println("解析到一条数据:"+ JSON.toJSONString(menus));
    }



    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
        System.out.println("读取完毕~~~~~~");
    }
}
